import http from "../https"
const baseURL = "http://82.157.143.31:8080"
const roleLimit = (id) => http({
    url: `${baseURL}/role/selectRoleMenu`,
    method: 'get',
    params: { id }
})

const role = (searchName) => http({
    url: `${baseURL}/role/selectRole`,
    method: 'get',
    params: { searchName }
})
const addrole = (obj) => http({
    url: `${baseURL}/role/addRole`,
    method: 'post',
    data: { ...obj }
})

const seletrole = (obj) => http({
    url: `${baseURL}/role/updateRoleById`,
    method: 'post',
    data: { ...obj }
})
const delrole = (obj) => http({
    url: `${baseURL}/role/deleteRoleById`,
    method: 'post',
    data: { ...obj }
})
export { role,roleLimit,addrole,seletrole,delrole}